01.b - Key-Components
Relevant source files
Purpose and ScopeLink copied!
This page provides an overview of the major system components in godeep.wiki, identifying the key frontend pages, backend APIs, automation scripts, and UI building blocks that compose the application. Each component is mapped to its corresponding code entities (files, routes, functions) to enable quick navigation to implementation details.
For detailed information about the overall architecture and system flow, see System Architecture. For implementation details of specific subsystems, refer to their dedicated sections: User Journey, Authentication & GitHub Integration, Payment Processing, Automation System, and Admin Panel.
Component OverviewLink copied!
The system consists of five primary component categories:
| Category | Component | Primary File(s) | Purpose |
|---|---|---|---|
| User-Facing Pages | Landing Page | app/page.tsx | Payment CTA and product description |
| Success Page | app/success/page.tsx | Post-payment GitHub connection prompt | |
| Thank You Page | app/thank-you/page.tsx | Confirmation and delivery timeline | |
| Dashboard | app/dashboard/page.tsx | User's connected repositories view | |
| Payment System | Checkout Action | app/actions.ts | Stripe checkout session creation |
| Webhook Handler | app/api/webhooks/stripe/route.ts | Payment event processing | |
| Authentication | OAuth Initiation | app/api/auth/github/route.ts | GitHub OAuth flow start |
| OAuth Callback | app/api/auth/github/callback/route.ts | Token exchange and installation logging | |
| Admin Interface | Admin Panel | app/admin/page.tsx | Password-protected token generator |
| Token API | app/api/admin/generate-token/route.ts | Installation access token generation | |
| Automation | ntfy Automation Script | scripts/ntfy-godeep-automation.sh | Repository cloning pipeline |
| Remote Variant | scripts/ntfy-godeep-automation-remote.sh | Alternative automation script | |
| UI Components | BeamButton | components/beam-button.tsx | Animated CTA button |
| SpotlightCard | components/spotlight-card.tsx | Interactive card with spotlight effect | |
| IconGlow | components/icon-glow.tsx | Icon wrapper with glow animation |
Sources: app/page.tsx
System Component ArchitectureLink copied!
The following diagram maps system components to their code locations and shows the data flow between them:
Component Relationships Diagram
This diagram shows how code entities interact across the system lifecycle. The createCheckoutSession() function initiates the payment flow, while the OAuthCallback route bridges payment to repository access through cookie-based session management. The automation script monitors ntfy.sh for both payment and installation events, then uses the TokenAPI to clone customer repositories.
Sources: app/page.tsx L62-L66
scripts/ntfy-godeep-automation.sh L6-L8
Frontend PagesLink copied!
Landing Page (app/page.tsx)Link copied!
The landing page is the entry point for all users, built as a Next.js Server Component with the following structure:
Key Elements:
- Hero Section: Title "Your Private Code Wiki" with gradient text styling app/page.tsx L42-L44
- CTA Button:
<BeamButton>with form action pointing tocreateCheckoutSessionapp/page.tsx L62-L66 - Feature Grid: Six feature cards using
<SpotlightCard>component app/page.tsx L107-L125 - Pricing Section: Fixed $10 pricing with Stripe payment CTA app/page.tsx L173-L194
Component Hierarchy:
Landing Page Component Structure
Sources: app/page.tsx L12-L213
Success and Thank You PagesLink copied!
These pages handle post-payment flow:
- Success Page (
app/success/page.tsx): Receivessession_idfrom Stripe redirect, displays GitHub connection prompt with session_id embedded in OAuth URL - Thank You Page (
app/thank-you/page.tsx): Final confirmation page with 1-9 hour delivery expectation message
Sources: CLAUDE.md L34-L42
DashboardLink copied!
The user-facing dashboard displays repositories connected through GitHub OAuth:
- Location: app/dashboard/page.tsx
- Authentication: Uses user OAuth token stored in httpOnly cookie
- Purpose: Shows user's own repositories (NOT customer repositories accessible via installation tokens)
- Token Type: User access token with 24-hour expiry
Sources: CLAUDE.md L59
Backend API ComponentsLink copied!
Payment Processing EndpointsLink copied!
createCheckoutSession Server Action
Location: app/actions.ts
Server action that creates Stripe checkout sessions:
- Product: "DeepWiki Analysis" priced at $10
- Success URL:
/success?session_id={CHECKOUT_SESSION_ID} - Cancel URL:
/(landing page) - Mode:
payment(one-time payment)
createCheckoutSession Flow
Sources: app/actions.ts
Stripe Webhook Handler
Endpoint: POST /api/webhooks/stripe
Location: app/api/webhooks/stripe/route.ts
Processes checkout.session.completed events:
- Verifies webhook signature using
STRIPE_WEBHOOK_SECRET - Extracts session data (session_id, customer_email)
- Sends notification to ntfy.sh topic with payment details
Sources: CLAUDE.md L153-L162
Authentication EndpointsLink copied!
OAuth Initiation (/api/auth/github)
Endpoint: GET /api/auth/github
Location: app/api/auth/github/route.ts
Initiates GitHub OAuth flow:
- Generates CSRF state token using
crypto.randomUUID() - Stores state in
github_oauth_statecookie (1-hour expiry) - Stores
session_id(if provided) instripe_session_idcookie (1-hour expiry) - Redirects to GitHub App installation URL with state parameter
URL Parameters Accepted:
session_id: Optional Stripe session ID for payment-to-installation linking
Sources: CLAUDE.md L56-L57
OAuth Callback (/api/auth/github/callback)
Endpoint: GET /api/auth/github/callback
Location: app/api/auth/github/callback/route.ts
Handles GitHub OAuth callback:
- Validates state parameter against cookie
- Exchanges authorization code for user access token
- Fetches user profile data (username, email, name)
- Retrieves
session_idfromstripe_session_idcookie - Logs complete installation details to Vercel logs
- Sends notification to ntfy.sh with installation_id
- Stores user token in
github_tokencookie (24-hour expiry) - Redirects to
/thank-youpage
Critical Logging Output:
GitHub Installation: {
session_id: "cs_test_...",
installation_id: "12345678",
username: "user",
email: "user@example.com",
timestamp: "ISO timestamp"
}
Sources: CLAUDE.md L58-L65
app/api/auth/github/callback/route.ts
Admin Panel SystemLink copied!
Admin Interface (/admin)Link copied!
Location: app/admin/page.tsx
Client-side React component with three states:
| State | Description | UI Elements |
|---|---|---|
| Unauthenticated | Password login form | Password input, Login button app/admin/page.tsx L100-L136 |
| Authenticated | Token generator interface | Installation ID input, Customer Email input (optional), Generate button app/admin/page.tsx L139-L215 |
| Token Generated | Token display with usage instructions | Token display, Clone commands, Repository list app/admin/page.tsx L217-L359 |
Authentication Flow:
Admin Panel State Management
Key Features:
- Password Storage: Uses
localStorage.setItem("admin_authenticated", "true")app/admin/page.tsx L43 - Token Display: Shows generated token with copy-to-clipboard functionality app/admin/page.tsx L236-L246
- Repository Name Formatting: Combines customer email with repo name:
{email}-{reponame}app/admin/page.tsx L91-L98 - Usage Examples: Displays git clone commands with embedded tokens app/admin/page.tsx L256-L264
Sources: app/admin/page.tsx L12-L363
Installation Token APILink copied!
Endpoint: POST /api/admin/generate-token
Location: app/api/admin/generate-token/route.ts
Generates installation access tokens for repository access:
Request Body:
{ "installationId": "12345678", "password": "ADMIN_PASSWORD"}
Response:
{ "token": "ghs_...", "expiresAt": "ISO timestamp", "repositories": [...], "user": { "username": "customer", "email": "customer@example.com", "name": "Customer Name" }}
Implementation:
- Verifies
passwordmatchesprocess.env.ADMIN_PASSWORD - Calls
getInstallationAccessToken(installationId)from lib/github-app.ts - Calls
getInstallationRepositories(installationId)to fetch accessible repos - Returns token with 1-hour expiry (GitHub App limitation)
Sources: app/api/admin/generate-token/route.ts
Automation InfrastructureLink copied!
ntfy Automation ScriptLink copied!
Location: scripts/ntfy-godeep-automation.sh
Bash script that subscribes to ntfy.sh notifications and automates repository cloning:
Configuration Variables:
TOPIC:"topic-XXXXXXXX"scripts/ntfy-godeep-automation.sh L6ADMIN_URL:"https://www.godeep.wiki/api/admin/generate-token"scripts/ntfy-godeep-automation.sh L7CLONE_DIR:"$HOME/godeep-clones"scripts/ntfy-godeep-automation.sh L8
Pipeline Stages:
Automation Script Pipeline
Key Operations:
- Installation ID Extraction: Uses grep to parse "Installation ID: 12345678" from message scripts/ntfy-godeep-automation.sh L53
- Token Generation: Calls admin API with installation_id and ADMIN_PASSWORD scripts/ntfy-godeep-automation.sh L63-L65
- Repository Cloning: Uses token as
x-access-tokenin git URL scripts/ntfy-godeep-automation.sh L90 - Repository Naming: Formats as
{email_prefix}-{repo_name}scripts/ntfy-godeep-automation.sh L79-L84 - Private Repo Creation: Uses GitHub CLI (
gh) to create private repo scripts/ntfy-godeep-automation.sh L106 - Cleanup: Deletes local clone to save disk space scripts/ntfy-godeep-automation.sh L114
macOS Integration:
- Uses
osascriptfor system notifications scripts/ntfy-godeep-automation.sh L59 scripts/ntfy-godeep-automation.sh L94 - Notifications include progress updates and completion status
Sources: scripts/ntfy-godeep-automation.sh L1-L152
Remote Automation VariantLink copied!
Location: scripts/ntfy-godeep-automation-remote.sh
Alternative version of automation script with similar functionality but designed for remote server deployment. Shares same core logic as local version.
Sources: scripts/ntfy-godeep-automation-remote.sh
UI Component LibraryLink copied!
Interactive ComponentsLink copied!
The system uses three custom UI components for enhanced user experience:
| Component | File | Purpose | Key Feature |
|---|---|---|---|
| BeamButton | components/beam-button.tsx | Primary CTA buttons | Animated gradient glow on hover components/beam-button.tsx L13 |
| SpotlightCard | components/spotlight-card.tsx | Feature display cards | Mouse-tracking spotlight effect components/spotlight-card.tsx L15-L20 |
| IconGlow | components/icon-glow.tsx | Icon containers | Radial glow effect on hover components/icon-glow.tsx L13 |
BeamButton ImplementationLink copied!
Wraps shadcn/ui <Button> with gradient animation:
Visual Effects:
- Outer glow: Gradient from blue-500 to purple-600 components/beam-button.tsx L13
- Blur effect: Animates from
blurtoblur-mdon hover components/beam-button.tsx L13 - Shadow:
0_0_20pxblue shadow that intensifies on hover components/beam-button.tsx L16
Usage in Landing Page:
<BeamButton size="lg" type="submit"> Generate DeepWiki — $10</BeamButton>
Sources: components/beam-button.tsx L1-L26
SpotlightCard ImplementationLink copied!
Mouse-tracking card with radial gradient spotlight:
Effect Implementation:
- Tracks mouse position relative to card bounds components/spotlight-card.tsx L15-L20
- Two layered gradients: base spotlight and mask-based border highlight components/spotlight-card.tsx L48-L63
- Opacity transitions on mouse enter/leave components/spotlight-card.tsx L30-L36
Usage in Landing Page:
- Feature grid uses 6 SpotlightCard instances app/page.tsx L116-L123
- Contains icon + label combination app/page.tsx L118-L120
Sources: components/spotlight-card.tsx L1-L68
IconGlow ImplementationLink copied!
Simple container for icons with hover glow:
Structure:
- Outer group wrapper with relative positioning components/icon-glow.tsx L12
- Background glow layer (blue-500/20 with blur) components/icon-glow.tsx L13
- Inner container with border transition components/icon-glow.tsx L14
Usage:
- "How It Works" section icons app/page.tsx L75-L77
- Icon transitions from slate-400 to blue-400 on hover app/page.tsx L76
Sources: components/icon-glow.tsx L1-L19
Component Integration SummaryLink copied!
The following table shows how components interact across the system:
| User Action | Frontend Component | Server Action/API | External Service | Automation |
|---|---|---|---|---|
| Pay $10 | app/page.tsx BeamButton | createCheckoutSession | Stripe API | - |
| Payment complete | - | POST /api/webhooks/stripe | ntfy.sh | Script triggered |
| Connect GitHub | app/success/page.tsx | GET /api/auth/github | GitHub OAuth | - |
| Authorize app | - | GET /api/auth/github/callback | GitHub API + ntfy.sh | Script triggered |
| Generate token | app/admin/page.tsx | POST /api/admin/generate-token | GitHub App API | - |
| View repos | app/dashboard/page.tsx | User OAuth token | GitHub API | - |
Sources: CLAUDE.md L33-L43
scripts/ntfy-godeep-automation.sh
Refresh this wiki
Last indexed: 23 November 2025 (922b35)
On this page
- Key Components
- Purpose and Scope
- Component Overview
- System Component Architecture
- Frontend Pages
- Landing Page ( app/page.tsx )
- Success and Thank You Pages
- Dashboard
- Backend API Components
- Payment Processing Endpoints
- Authentication Endpoints
- Admin Panel System
- Admin Interface ( /admin )
- Installation Token API
- Automation Infrastructure
- ntfy Automation Script
- Remote Automation Variant
- UI Component Library
- Interactive Components
- BeamButton Implementation
- SpotlightCard Implementation
- IconGlow Implementation
- Component Integration Summary
Ask Devin about godeep.wiki-jb